package com.artisan.domain.repositoryInterface;

import com.artisan.domain.dto.AdPositionDto;
import com.artisan.domain.entity.MAdPosition;
import com.artisan.domain.entity.MAdType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 广告位置数据访问接口
 */
@Repository
public interface IAdPositionRepository extends JpaRepository<MAdPosition, Integer> {
    @Query(value = "select c from MAdPosition c where c.status=:status order by c.addDate desc ")
    List<MAdPosition> findList(@Param("status")int status);
}
